<?php
namespace App;
class CodeResponse {
    // 通用返回码
    const SUCCESS = [0, '成功'];
    const SUCCESS_STATE = [200, '成功'];
    const FAIL = [-1, '错误'];
    const PARAM_ILLEGAL = [401, '参数不合法'];
    const PARAM_VALUE_ILLEGAL = [402, '参数值不对'];
    const PARAM_VALUE_SENSITIVE = [403, '参数值包含敏感词'];
    const PARAM_STATUS = [404, '状态不存在'];
    const PARAM_STATUS_ID = [405, '不存在该值的数据'];
    const UN_LOGIN = [601, '请登录'];
    const UN_LOGIN_LOCAL = [602, '账号已在其他地方登陆'];
    const UPDATED_FAIL = [603, '更新数据失败'];

    // 业务返回码
    const AUTH_INVALID_ACCOUNT = [700, '账号不存在'];
    const AUTH_INVALID_ROLE = [700, '角色不存在'];
    const AUTH_CAPTCHA_UNSUPPORT = [701, ''];
    const AUTH_CAPTCHA_FREQUENCY = [702, '验证码未超时1分钟，不能发送'];
    const AUTH_CAPTCHA_UNMATCH = [703, '验证码错误'];
    const AUTH_NAME_REGISTERED = [704, '名称已存在'];
    const AUTH_PHONE_REGISTERED = [705, '手机号已存在'];
    const AUTH_MEAIL_REGISTERED = [706, '邮箱已存在'];
    const AUTH_PHONE_UNREGISTERED = [707, '手机号格式不正确'];
    const AUTH_MEAIL_UNREGISTERED = [708, '邮箱格式不正确'];


    const AUTH_SCHOOL_CLASS_COURSE_REGISTERED = [709, '学校不存在该课程'];
    const AUTH_SCHOOL_NOT_SET_ID = [714, '未设置学校id'];
    const AUTH_SCHOOL_COURSE_WORKS_REGISTERED = [710, '该课程学校已经使用'];
    const AUTH_SCHOOL_STUDENT_NUM = [711, '该课程学校学生数量已达到限制您不能添加'];
    const IMPORT_UNKNOWN= [712, '导入错误'];
    const GOODS_INVALID = [713, ''];

    const ORDER_UNKNOWN = [720, ''];
    const ORDER_INVALID = [721, ''];
    const ORDER_CHECKOUT_FAIL = [722, ''];
    const ORDER_CANCEL_FAIL = [723, ''];
    const ORDER_PAY_FAIL = [724, ''];
    // 订单当前状态下不支持用户的操作，例如商品未发货状态用户执行确认收货是不可能的。
    const ORDER_INVALID_OPERATION = [725, ''];
    const ORDER_COMMENTED = [726, ''];
    const ORDER_COMMENT_EXPIRED = [727, ''];

    const GROUPON_EXPIRED = [730, '团购已过期!'];
    const GROUPON_OFFLINE = [731, '团购已下线!'];
    const GROUPON_FULL = [732, '团购活动人数已满!'];
    const GROUPON_JOIN = [733, '团购活动已经参加!'];

    const COUPON_EXCEED_LIMIT = [740, '优惠券已领完'];
    const COUPON_RECEIVE_FAIL = [741, '优惠券领取失败'];
    const COUPON_CODE_INVALID = [742, ''];

    const AFTERSALE_UNALLOWED = [750, ''];
    const AFTERSALE_INVALID_AMOUNT = [751, ''];
    const AFTERSALE_INVALID_STATUS = [752, ''];

    const AUTH_TRAINING_RESULT_REGISTERED = [760, '实训时间已结束'];

    // 文件返回码
    const IMAGE_INCORRECT_FORMAT = [800, '图片格式不正确'];
    const FILE_SIZE = [801, '文件超出大小'];
    const FILE_INCORRECT_FORMAT = [802, '文件格式不正确'];

    // 购物车
    const GOODS_CART_INVALID = [900, '商品不存在'];
    const GOODS_CART_NUM = [901, '购物车数量不能小于1'];
    const GOODS_CART_NO = [904, '购物车不存在该商品'];
    const GOODS_CART_STOCK = [902, '商品库存不足'];

    const GOODS_ORDER_TYPE = [903, '订单类型不正确'];

    const GOODS_ORDER_SKU = [910, '未找到商品'];
    const GOODS_ORDER_NUM = [915, '未设置商品数量'];
    const GOODS_ORDER_NO = [911, '未找到该订单'];
//    const ORDER_COMMENTED = [726, ''];
//    const ORDER_COMMENT_EXPIRED = [727, ''];
    const SUPPLIER_GOODS_ORDER_EXIST = [920, '供应商已经存在该订单'];

    const AUTH_CAPTCHA_EXPIRED = [930, '验证码过期'];


    const PAGE_INVALID = [940, '试卷不存在'];

    const CERTIFICATE_INVALID = [950, '证书不存在'];

    const CERTIFICATE_PAPER_INVALID = [960, '没有找到该用户下的证书试卷'];

    const EXAMINATION_OVERTIME = [970, '考试时间已结束'];
    const EXAMINATION_COMPLETE = [971, '您已完成考试'];
}
